from django.shortcuts import render
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView

# Create your views here.


# GET /skus/(?P<pk>\d+)/comments/
class CommentsView(APIView):
    pass
    # permission_classes = [IsAuthenticated]
    #
    # def get(self, request, pk):
    #     # 1.获取当前sku商品的所有订单信息对象
    #     order_goods = OrderGoods.objects.filter(sku_id=pk)
    #
    #     # 2. 将获取到的订单信息反序列化
    #     serializer = CommentSerializer(order_goods, many=True)
    #
    #     # 3.返回响应
    #     return Response(serializer)